home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #2 / Ham Radio 2000 - Volume 2.iso / HAMV2 / PACKET / 7PLUSDLL / 7PLUSDLL.TXT < prev    next >
Encoding:
Text File  |  1997-01-24  |  5.3 KB  |  107 lines

  1.                              7PLUS.DLL - v2.17
  2.                              =================
  3.                                  (11-06-96)
  4.  
  5.                           Based on 7+ source v2.17
  6.  
  7.                    Original by Axel Bauda (DG1BBQ @ DB0CL)
  8.             DLL'ed by Charlie McIver - Purple Computer Solutions
  9.                   
  10. This DLL is "hamware" - I don't make any charge or restriction on the use of 
  11. it, provided it is within the scope of of Amateur Radio. ANY other use must 
  12. obtain permission first (which probably will cost).
  13.  
  14. This is simply a DLL version of Axel's 7+ software. 7+ is very popular, but for
  15. authors who use Visual Basic the 'C' source isn't much use when trying to add
  16. automatic 7+ facilities. Turning it into a DLL allows (not just VB users) 
  17. access to 7+ encoding / decoding without having to fully understand it.
  18.  
  19. Here are the function prototypes in 'C' :-
  20. int FAR PASCAL _export seven_plus_join(LPSTR file1, LPSTR file2)
  21. int FAR PASCAL _export seven_plus_encode(LPSTR filename, long Blocksize, int first_part, int last_part, int fls, int binary);
  22. int FAR PASCAL _export seven_plus_process(LPSTR filename, int cleanup, int override);
  23. int FAR PASCAL _export seven_plus_extract(LPSTR filename);
  24. int FAR PASCAL _export seven_plus_version();
  25. int FAR PASCAL _export Seven_Plus_Do(LPSTR lpstrCommands, int nStrLen);
  26.  
  27. Here are the VB declarations :-
  28. Declare Function seven_plus_encode Lib "7plus.dll" (ByVal filename As String, ByVal blocksize As Long, ByVal first_part As Integer, ByVal last_part As Integer, ByVal info As Integer, ByVal crmode As Integer) As Integer
  29. Declare Function seven_plus_process Lib "7plus.dll" (ByVal filename As String, ByVal Path As String, ByVal cleanup As Integer, ByVal override As Integer) As Integer
  30. Declare Function seven_plus_version Lib "7plus.dll" () As Integer
  31. Declare Function seven_plus_extract Lib "7plus.dll" (ByVal filename As String) As Integer
  32. Declare Function seven_plus_join Lib "7plus.dll" (ByVal file1 As String, ByVal file2 As String) As Integer
  33. Declare Function Seven_Plus_Do Lib "7plus.dll" (ByVal Commands As String, ByVal StrLen) As Integer 
  34.  
  35. encode  blocksize  (bytes) - length of encoded file (0 defaults to around 10K)
  36.         first_part (0)     - Reserved for future use
  37.         last_part  (0)     - Reserved for future use
  38.         fls        (0/1)   - Generate FLS file
  39.         binary     (0/1)   - Use 'Binary' mode (affects CR and LF)
  40.  
  41. process cleanup    (0/1)   - Remove all obselete files after decode
  42.         override   (0/1)   - Reserved for future use
  43.  
  44. The return values are the same as the original 7plus code :-
  45.   0 No errors detected.
  46.   1 Write error.
  47.   2 File not found.
  48.   3 7PLUS header not found.
  49.   4 File does not contain expected part.
  50.   5 7PLUS header corrrupted.
  51.   6 No filename for extracting defined.
  52.   7 invalid error report / correction / index file.
  53.   8 Max number of parts exceeded.
  54.   9 Bit 8 stripped.
  55.  10 User break in test_file();
  56.  11 Error report generated.
  57.  12 Only one or no error report to join
  58.  13 Error report/cor-file does not relate to the same original file
  59.  14 Couldn't write 7plus.fls
  60.  15 Filesize of original file and the size reported in err/cor-file not equal
  61.  16 Correction not successful.
  62.  17 No CRC found in err/cor-file.
  63.  18 Timestamp in metafile differs from that in the correction file.
  64.  19 Metafile already exists.
  65.  
  66. These are as documented by Axel, I spotted one error. 12 can also mean 
  67. out of memory.
  68.  
  69. Generally you should use the seven_plus_process function to decode files, and 
  70. seven_plus_encode to encode files. You can use seven_plus_process to encode 
  71. files using all the defaults. I suggest that in your implementation of 7plus
  72. into your program you should have a directory where all 7+ files are put.
  73. Before any 7plus operation you should change into this directory, perform the
  74. funtion and, if necessary, change back out. This is particulary important when
  75. processing a .COR file, where the original .7PL or .Pxx files are needed.
  76. Another problem is presented when processing a .ERR file, the original uncoded
  77. file must still be available. 
  78.  
  79. Functions to cover extract and join are also provided. To join multiple error
  80. files you should leave the second filename paramer blank. I'm unsure of how 
  81. effective their implementation is. I'm not much of a 7+ user myself. If you 
  82. have ideas of a better way to do all this tell me!
  83.  
  84. Included withing the zip is a VB program call WIN7PLUS, which is a simple 
  85. version of 7+ for Windows. Study this and how it works.
  86.  
  87. I have started a list of people developing software using this DLL. If you
  88. wish to be added to this then simply ask. This way I can tell people when I
  89. update it.
  90.  
  91. This was a very simple and basic conversion, additions are possible, just ask!
  92.  
  93. The only known bug relates to the release of a file handle somewhere in the 7+
  94. code. I have passed this to Axel.
  95.  
  96. 2.17 brings the Seven_Plus_Do call. One string is passed in, and the length
  97. of it. The string should be zero terminated. See the example for more details.
  98. The DLL proecesses this exactly as 7+ does as a DOS program.
  99.  
  100. Revision History :-
  101.  
  102. Date      Rel   Comments
  103. ================================================================
  104. 07-06-96  1.0   First version done for test by Pierre (VE2BLY)
  105. 11-06-96  2.03  Revised the bugs! 
  106. 18-08-96  2.17  Updated to 7+ source v2.17, added Seven_Plus_Do call
  107.